1. Field of the Invention
This invention is related to the field of graphical information processing, and more particularly to conversion from one color space to another.
2. Description of the Related Art
Part of the operation of many computer systems, including portable digital devices such as mobile phones, notebook computers and the like, is the use of some type of display device, such as a liquid crystal display (LCD), to display images, video information/streams, and data. Accordingly, these systems typically incorporate functionality for generating images and data, including video information, which are subsequently output to the display device. Such devices typically include video graphics circuitry to process images and video information for subsequent display.
In digital imaging, the smallest item of information in an image is called a “picture element”, more generally referred to as a “pixel”. For convenience, pixels are generally arranged in a regular two-dimensional grid. By using this arrangement, many common operations can be implemented by uniformly applying the same operation to each pixel independently. Since each pixel is an elemental part of a digital image, a greater number of pixels can provide a more accurate representation of the digital image. The intensity of each pixel can vary, and in color systems each pixel has typically three or four components such as red, green, blue, and black.
Most images and video information displayed on display devices such as LCD screens are interpreted as a succession of image frames, or frames for short. While generally a frame is one of the many still images that make up a complete moving picture or video stream, a frame can also be interpreted more broadly as simply a still image displayed on a digital (discrete, or progressive scan) display. A frame typically includes a specified number of pixels according to the resolution of the image/video frame. Information associated with a frame typically includes color values for every pixel to be displayed on the screen. Color values are commonly stored in 1-bit monochrome, 4-bit palletized, 8-bit palletized, 16-bit high color and 24-bit true color formats. An additional alpha channel is oftentimes used to retain information about pixel transparency. The color values can represent information corresponding to any one of a number of color spaces. One color space is YPbPr, which is used in video electronics, and is commonly referred to as “component video”. YPbPr is the analog representation of the YCbCr color space, which is associated with digital video. The YPbPr color space and YCbCr color space are numerically equivalent, with scaling and offsets applied to color values in the YPbPr color space to obtain corresponding color values in the YCbCr color space.
Color space conversion is the translation of the representation of a color value from one color space to another, and typically occurs in the context of converting an image that is represented in one color space to another color space, with the goal of making the translated image look as similar as possible to the original. For example, color values in the YPbPr color space are created from the corresponding gamma-adjusted color values in the RGB (red, green and blue) color space, using two defined constants KB and KR. Consequently, the equations defining color values in the YCbCr color space are formed in a way that rotates the entire nominal RGB color space and scales it to fit within the larger YCbCr color space, resulting in some color values within the YCbCr color space that cannot be represented in the corresponding RGB color space within the nominal RGB range. This may present some difficulty in determining how to correctly interpret and convert certain color values from the YCbCr color space into color values in the RGB color space, and under certain conditions may lead to different visual results than expected and/or desired.
Other corresponding issues related to the prior art will become apparent to one skilled in the art after comparing such prior art with the present invention as described herein.